import Text from './text'
import Image from './image'
import Carousel from './carousel'
import RectangleBorder from './rectangle-border'
import Iframe from './iframe'
import Button from './button'
import Input from './input'
import Textarea from './textarea'
import bgMusic from './bg-music'
import BaseForm from './baseform'
import ScrollText from './scrolltext'
import DatePicker from './datepicker'
import Select from './select'
import Chartline from './chartline'
import Chartcolumnar from './chartcolumnar'
import Chartmap from './chartmap'
import Chartpie from './chartpie'
import Breadcrumb from './breadcrumb'
import Hyperlink from './hyperlink' //新增-超链接
import Chartstacked from './chartstacked' //新增-堆叠图
import Chartbar from './chartbar' //新增-条形图
import Chartsimplecolumnar from './chartsimplecolumnar' //柱状图
import Chartstackedbar from './chartstackedbar' //新增-条形堆叠图
import Chartrose from './chartrose' //新增-玫瑰图
import Chartannular from './chartannular' //新增-环形图
import Maptype1 from './maptype1' //地图-类型1
import CWordcloud from './wordcloud'
import Maptype2 from './maptype2' //地图-类型2
import Chartradar from './chartradar'
import Chartpanel from './chartpanel'
import Chartradio from './chartradio'
import Map3dbar from './map3dbar'
import Tabs from './tabs'
import Dropdown from './Dropdown'
import weather from './weather'
import time from './time'

const components = [
	Text,
	Image,
	Carousel,
	RectangleBorder,
	Iframe,
	Button,
	Input,
	Textarea,
	bgMusic,
	BaseForm,
	Breadcrumb,
	ScrollText,
	DatePicker,
	Select,
	Chartline,
	Chartcolumnar,
	Chartmap,
	Chartpie,
	Hyperlink,
	Chartstacked,
	Chartbar,
	Chartsimplecolumnar,
	Chartstackedbar,
	Chartrose,
	Chartannular,
	Maptype1,
	CWordcloud,
	Maptype2,
	Chartradar,
	Chartpanel,
	Chartradio,
	Map3dbar,
	Tabs,
	Dropdown,
	weather,
	time
]
const install = function (Vue) {
	if (install.installed) return
	install.installed = true
	components.map(component => Vue.component(component.name, component))
}
if (typeof window !== 'undefined' && window.Vue) {
	install(window.Vue)
}

let _c_register_components_object = {}
components.forEach(item => {
	_c_register_components_object[item.name] = item
})

export { _c_register_components_object }

export default {
	install,
	Text,
	Image,
	Carousel,
	RectangleBorder,
	Iframe,
	Button,
	Input,
	Textarea,
	bgMusic,
	BaseForm,
	Breadcrumb,
	ScrollText,
	Chartline,
	Chartcolumnar,
	Chartmap,
	Chartpie,
	Hyperlink,
	Chartstacked,
	Chartbar,
	Chartsimplecolumnar,
	Chartstackedbar,
	Chartrose,
	Chartannular,
	Maptype1,
	CWordcloud,
	Maptype2,
	Chartradar,
	Chartpanel,
	Chartradio,
	Map3dbar
	// 所有组件，必须具有 install，才能使用 Vue.use()
}
